import React from 'react';
import PropTypes from 'prop-types';
import {
    Form,
    Row,
    Col,
    Input,
    Button
} from 'antd'


const FormItem = Form.Item;

// 组件本身
const Search = ({form}) => {
    const { getFieldDecorator } = form;

    const formItemLayout = {
        labelCol: { span: 5 },
        wrapperCol: { span: 19 },
    };

    return (
        <div>
            <Form
                className="ant-advanced-search-form"
                // onSubmit={this.handleSearch}
            >
                <Row gutter={24}>
                    <Col span={8}>
                        <FormItem {...formItemLayout}>
                            {getFieldDecorator("name")(
                                <Input placeholder="请输入名称" />
                            )}
                        </FormItem>
                    </Col>
                    <Col span={8}>
                        <FormItem>
                            <Button>搜索</Button>
                        </FormItem>

                    </Col>
                </Row>
            </Form>
        </div>
    )
}

// 组件属性验证
Search.propTypes = {}

const wrapper = Form.create()(Search);
export default wrapper;